#include "app_mqtt.h"
#include "log/log.h"
#include <unistd.h>

int recv_cb(char *json)
{
    log_debug("处理接收到的远程消息数据: %s", json);
    return 0;
}

int main(int argc, char const *argv[])
{
    app_mqtt_init();
    app_mqtt_registerRecvCallback(recv_cb);

    app_mqtt_send("{\"name\":\"tom\", \"age\":18}");
    sleep(100);
    app_mqtt_close();
    return 0;
}
